package com.effectiv.crm.controller;

import javax.inject.Inject;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.effectiv.crm.service.api.LeadService;

@Controller
@RequestMapping("/home")
public class DashboardController {
	
	@Inject
	private LeadService leadService;
	
	@RequestMapping("/dashboard")
    public String gotoHome(Model model){
    	
		model.addAttribute(leadService.findLastN(5));
		
		
    	return "dashboard";
    }
}
